using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;


class CommenRegex
{
    private static bool check(string source, string reg)
    {
        // Create a new Regex object.
        Regex r = new Regex(reg);
        // Find a single match in the string.
        Match m = r.Match(source);
        bool temp;
        if (m.Success)
        {
            // Print out the character position where a match was found. 
            // (Character position 3 in this case.)
            // Console.WriteLine("Found match at position " + m.Index);
            temp = true;
        }
        else
        {
            temp = false;
        }
        return temp;
    }

    public static bool checkNum(string source)
    {
        return check(source, @"^[1-9]\d*$");

    }
    public static bool checkDate(string source)
    {
        return check(source, @"[\d]{4}-[\d]{2}-[\d]{2}");

    }
    public static bool checkIDcard(string source)
    {
        return check(source, @"\d{15}|\d{18}");

    }

}


